package com.ruoyi.warehouse.mapper;

import java.util.List;
import com.ruoyi.warehouse.domain.FhjlShippingRecordForm;
import com.ruoyi.warehouse.domain.FhslQuantityShipped;
import org.apache.ibatis.annotations.Mapper;

/**
 * 成品发货Mapper接口
 * 
 * @author ruoyi
 * @date 2024-07-04
 */
@Mapper
public interface FhjlShippingRecordFormMapper 
{
    /**
     * 查询成品发货
     * 
     * @param fhCode 成品发货主键
     * @return 成品发货
     */
    public FhjlShippingRecordForm selectCpkcFnishedProductInventoryCpCode(String fhCode);

    /**
     * 查询成品发货
     *
     * @param cpCode 成品发货主键
     * @return 成品发货
     */
    public FhjlShippingRecordForm selectTj(String cpCode);

    /**
     * 查询成品发货列表
     * 
     * @param fhjlShippingRecordForm 成品发货
     * @return 成品发货集合
     */
    public List<FhjlShippingRecordForm> selectFhjlShippingRecordFormList(FhjlShippingRecordForm fhjlShippingRecordForm);

    /**
     * 新增成品发货
     * 
     * @param fhjlShippingRecordForm 成品发货
     * @return 结果
     */
    public int insertFhjlShippingRecordForm(FhjlShippingRecordForm fhjlShippingRecordForm);

    /**
     * 修改成品发货
     * 
     * @param fhjlShippingRecordForm 成品发货
     * @return 结果
     */
    public int updateFhjlShippingRecordForm(FhjlShippingRecordForm fhjlShippingRecordForm);

    /**
     * 删除成品发货
     * 
     * @param fhCode 成品发货主键
     * @return 结果
     */
    public int deleteFhjlShippingRecordFormByFhCode(String fhCode);

    /**
     * 批量删除成品发货
     * 
     * @param fhCodes 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFhjlShippingRecordFormByFhCodes(String[] fhCodes);

    /**
     * 批量新增${subTable.functionName}
     * 
     * @param fhslQuantityShippedList ${subTable.functionName}列表
     * @return 结果
     */
    public int batchFhslQuantityShipped(List<FhslQuantityShipped> fhslQuantityShippedList);
    

    /**
     * 通过成品发货主键删除${subTable.functionName}信息
     *
     * @param fhCode 成品发货ID
     * @return 结果
     */
    public int deleteFhslQuantityShippedByFhCode(String fhCode);


    //根据发货单查发货详情
    public List<FhslQuantityShipped> selectFhslByFhCode(String fhCode);
    /**
     * 审核
     * */
    //减少库存
    public int examineDeliveryStorage(FhslQuantityShipped fhslList);
    //修改与预库数量
    public int updateCpkcBeforehandNum(List<FhslQuantityShipped> fhslList);
    // 修改状态为已审核
    public int updateCpkcIsExamine(String fhCode);

    /**
     * 撤销
     * */
    //加库存
    public int cancelDeliveryStorage(FhslQuantityShipped fhslList);
    // 修改状态为未审核
    public int updateCpkcIsExamineCancel(String fhCode);


}
